__author__ = 'ronan and darren'

import unittest
from ChessBoard import ChessBoard
import validPieceMoves

class TestValidRookMoves(unittest.TestCase):

    #def __init__(self,moves=[]):
	#unittest.TestCase.__init__(self,"testRun")
	#self.moves = moves

    def setUp(self):
        self.board = ChessBoard()
	#self.moves = [((0,0),2),((0,7),0),((7,0),2),((7,7,),0)]
	self.moves = [((0,0),[(1,0),(0,1)]),((0,7),[]),((7,0),[(6,0),(7,1)]),((7,7,),[])]
	#self.board.setPos(pos)

    def tearDown(self):
        pass

    def testRun(self):
	for f in self.moves:
		val = self.board.getValidRookMoves(f[0])
		print "val = ",val,"f[1] = ",f[1]
		self.assertEqual(val,f[1])
		print "success"

    #def testTwo(self):
	# non empty moves
	#	pass
	

def main():
        try:
	    moves = []
            t = TestValidRookMoves()
        except Exception as e:
            print "Error " + e.message


if __name__ == "__main__":
    unittest.main()
